
import {createStore} from "redux";


// 数据
const state = {
    isLoading1:false
}

// 函数（对数据的操作）：

const reducer =(state,action)=>{
    switch(action.type){
        case "SHOW":return {
            ...state,
            isLoading1:true
        }
        case "HIDE":return {
            ...state,
            isLoading1:false
        }
        default:return state
    }

}

export default createStore(reducer,state)